<template>
	<view>
		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" active-color="#FF9E5D"></u-tabs>
		<view class="foot_line"></view>
		<swiper :duration="1000" :style="{height:swiperHeight+'px'}" @change="swiperChange" :current="current">
			<swiper-item>
				<scroll-view scroll-y="true" class="foot_scroll">
					<view class="follow_style">
						<image src="/static/img_156.png" mode="" ></image>
						<text class="center_content">哆啦A梦</text>
						<view class="right_content">
							<text>已关注</text>
						</view>
					</view>
				</scroll-view>
			</swiper-item>
			<swiper-item>
				<scroll-view scroll-y="true" class="foot_scroll">
					<view class="follow_style">
						<image src="/static/img_156.png" mode="" ></image>
						<text class="center_content">哆啦A梦</text>
						<view class="right_content_none">
							<text>关注</text>
						</view>
					</view>
				</scroll-view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					name: '关注'
				}, {
					name: '粉丝'
				}],
				current: 0,
				swiperHeight: '',
			};
		},
		onLoad() {
			uni.getSystemInfo({
				success: (res) => {
					console.log(res)
					this.swiperHeight = res.windowHeight - uni.upx2px(80)
				}
			})
		},
		methods: {
			change(e) {
				this.current = e
			},
			swiperChange(e){
				this.current = e.detail.current
			}
		}
	}
</script>

<style lang="scss">
	.foot_line {
		width: 100%;
		height: 10rpx;
		background-color: #f4f8fb;
	}

	.foot_scroll {
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		padding-top: 25rpx;
	}
.follow_style{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 25rpx 30rpx;
	box-sizing: border-box;
	image{
		width: 90rpx;
		height: 90rpx;
		border-radius: 50%;
		margin-right: 30rpx;
	}
	.center_content{
		flex: 1;
		font-size: 28rpx;
		color: #222222;
	}
	.right_content{
		width: 110rpx;
		height: 60rpx;
		border-radius: 10rpx;
		text-align: center;
		line-height: 60rpx;
		background-color: #F4F8FB;
		color: #888888;
		font-size: 28rpx;
	}
	.right_content_none{
		width: 110rpx;
		height: 60rpx;
		border-radius: 10rpx;
		text-align: center;
		line-height: 60rpx;
		border: 2rpx solid #888888;
		color: #888888;
		font-size: 28rpx;
	}
}
	

	
</style>
